module.exports = (err, req, res, next) => {
  const { logger } = req.container.cradle

  logger.error(err.stack)
  const status = err.status || 400
  res.status(status).json({
    code: -1,
    message: err.message,
  })
}
